Accusoft.FSInvoices1.Net
Update Templates

FormSuite for Invoices has the ability to create new templates; however, your developed application must manage and maintain all the templates. The ITemplateProvider interface provides all the tools required to allow FormSuite for Invoices and your application to pass templates back and forth. Template creation and updates can be considered a standalone operation since it is done outside the process of generating a FormsResult for an invoice document. From an application’s point of view, there is no difference between creating a template and updating a template.  The call to TemplateIO.UpdatePageTemplates will update all the templates associated with the vendor identified by IVendor, Company and output FormResult of an Accusoft.FSInvoices.Processor.Anayze() operation. An IImageProvider is required to load associated image files of the document being templated. If a template for one of the pages in IImageProvider currently does not exist, it will be created.

The following code example demonstrates where the TemplateIO.UpdateTemplate() operation should fit into the applications processing scheme.

Example
Copy Code
// Create an instance of the license class
using (Licensing license = new Licensing())
{
    license.SetSolutionName("YourSolutionName");
    license.SetSolutionKey(12345, 12345, 12345, 12345);
    license.SetOEMLicenseKey("2.0.AStringForOEMLicensingContactAccusoftSalesForMoreInformation…");
 
    // Update the templates for the form result
    TemplateIO.UpdatePageTemplates(templateProvider, formResult, companyData, vendor, true, license);
}


 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback